-
Notifications
You must be signed in to change notification settings - Fork 1k
add nullaway to spring jms (part 2) #15409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
...lemetry/javaagent/instrumentation/spring/jms/v6_0/JmsDestinationAccessorInstrumentation.java
Outdated
Show resolved
Hide resolved
| return null; | ||
| } | ||
| // suppress receive span creation in jms instrumentation | ||
| @SuppressWarnings("NullAway") // request is typed as Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if it would make sense to add @Nullable to the parameter in suppressSpan (and all the other downstream effects of that) to avoid having to suppress this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that - and it's not working (have to look up the details if required)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check? I'm asking because the reason "request is typed as Void" doesn't really seem correct here. Rather the reason seems that the method really does accept Nullable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
InstrumenterUtil.suppressSpan() calls spanKindExtractor.extract(request) which doesn't accept a null request. Here it works because the instrumenter uses SpanKindExtractor.alwaysConsumer() that doesn't use the request.
The comment // request is typed as Void is misleading as here request is MessageWithDestination and the response is Void.
No description provided.